package com.ext.bootsecurity25.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import javax.sql.DataSource;

//@Configuration
//@PropertySource(value = { "classpath:db.properties" })
//public class DataSourceConfig {
/*    @Value("${url}")
    private String url;
    @Value("${dbname}")
    private String dbname;
    @Value("${dbpwd}")
    private String dbpwd;
    @Value("${driverClassName}")
    private String driverClassName;

    @Bean
    public DataSource configDataSource() {
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setDriverClassName(driverClassName);
        dataSource.setUrl(url);
        dataSource.setUsername(dbname);
        dataSource.setPassword(dbpwd);
        return dataSource;
    }*/
//}
